<template>
	<view>
    <view class="xmain">
      <headBar :title="title"></headBar>
      <view>
        <rich-text :nodes="content"></rich-text>
      </view>
    </view>
    <bootNav nav="home"></bootNav>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
        content:'',
			}
		},
    onLoad(e) {
      var t = this;
      if(e.type){
        t.doType(e.type);
      }

    },
		methods: {
      doType(type){
        var t = this;
        if(type == 'agreement'){
          t.title = '用户协议';
        }else if(type == 'privacy'){
          t.title = '隐私政策';
        }
        t.doContent(type);
      },
      doContent(type){
        var t = this;
        uni.request({
          url: 'https://cdn.quick365.cn/zl/static/content/'+type+'/ytjk.html',
          data: {}
        }).then(res=>{
          res = res.data;
          // console.log(res);
          t.content = res;
          console.log(t.content);
        });
      }
		}
	}
</script>

<style>

</style>
